package com.da.boot.controller;

import com.da.boot.bean.Car;
import com.da.boot.bean.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author JokerDa.
 * @date 2021/1/19 10:46
 * Description:
 */
@RestController
public class HelloController {
    @Autowired
    private Car car;
    @Autowired
    private Person person;

    @GetMapping("/hello")
    public String hello() {
        return "hello spring boot 2!";
    }

    @GetMapping("/car")
    public Car getCar() {
        return car;
    }

    @GetMapping("/person")
    public Person getPerson() {
        return person;
    }
}
